{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "alarm ring....\n",
      "spray water ...\n",
      "dial 119...\n"
     ]
    }
   ],
   "source": [
    "class alarmsensor():\n",
    "    def run(self):\n",
    "        print(\"alarm ring....\")\n",
    "class watersprinker():\n",
    "    def run(self):\n",
    "        print('spray water ...')\n",
    "        \n",
    "class emergencydialer():\n",
    "    def run(self):\n",
    "        print('dial 119...')\n",
    "class emergencyfacade():\n",
    "    def __init__(self):\n",
    "        self.alarm_sensor=alarmsensor()\n",
    "        self.water_sprinker=watersprinker()\n",
    "        self.emeragency_dialer=emergencydialer()\n",
    "    def runall(self):\n",
    "        self.alarm_sensor.run()\n",
    "        self.water_sprinker.run()\n",
    "        self.emeragency_dialer.run()\n",
    "if __name__=='__main__':\n",
    "    emergency_facade=emergencyfacade()\n",
    "    emergency_facade.runall()\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
